home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1993 November / JCSM Shareware Collection - 1993-11.iso / cl760 / edgraphj.lzh / EXPANDME.EXE / lha / POLAR2.GRF < prev    next >
Text File  |  1992-11-19  |  2KB  |  39 lines

  1. {------------------------------------------------------------------------
  2. { POLAR2.GRF - EdGraph demo program (polar coords)
  3. {
  4. { Type - AltV to see this demo, or
  5. {      - AltP to print it, but first...SPECIFY WHAT PRINTER YOU ARE USING:
  6. {--------------------------------------------------------------------------}
  7. Printer=13;   { Change the value to one of these, depending on your printer:}
  8.              {      1 = Generic 9 pin dot matrix,                          }
  9.              {   2..7 = Epson: 2=MX, 3=RX, 4=FX, 5=EX, 6=LX, 7=LQ          }
  10.              {   8..9 = IBM: 8=ProPrinter, 9=QuietWriter                   }
  11.              {     10 = NEC 24 pin                                         }
  12.              {     11 = Toshiba 24 pin                                     }
  13.              { 12..13 = HP: 12=DeskJet, 13=LaserJet                        }
  14.              {     14 = PostScript printers                                }
  15. {--------------------------------------------------------------------------}
  16.  
  17. PgHeight=160; PgWidth=160; Orientn=1; Res=1;
  18. Initialise(Printer,PgHeight,PgWidth,Orientn,Res,"LPT1");
  19.  
  20. x1=-2.5; y1=-2; x2=1; y2=2;
  21. NewPlot(x1,y1,x2,y2,25,105,20,120,0,0);
  22.  
  23. xaxis("x",y1,-3,1,1,5,0,1);
  24. yaxis("y",x1,y1,1,1,5,0,1);
  25. xaxis("",y2,-3,1,2,5,0,0);
  26. yaxis("",x2,y1,1,2,5,0,0);
  27.  
  28. Line(x1,0,x2,0);   {cross-hairs}
  29. Line(0,y1,0,y2);
  30.  
  31. MoveTo(x1+0.5,y2-0.5);
  32. TextStyle(0,0,1);  {underline}
  33. Text(" Cardioid ");
  34.  
  35. Polar(1); MoveTo(0,0);
  36. For theta=0 to 6.3 step 0.03;
  37.   LineTo(theta,1-cos(theta));
  38. EndFor;
  39.